home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / a_utils / _archvrs / unix / unzip51 / amiga / z-stat.h < prev   
Encoding:
C/C++ Source or Header  |  1992-10-06  |  1.5 KB  |  53 lines

  1. #ifndef __STAT_H
  2. #define __STAT_H
  3.  
  4. /* Since older versions of the Lattice C compiler for Amiga, and all current */
  5. /* versions of the Manx Aztec C compiler for Amiga, either provide no stat() */
  6. /* function or provide one inadequate for unzip (Aztec's has no st_mode      */
  7. /* field), we provide our own stat() function in stat.c by Paul Wells, and   */
  8. /* this fake stat.h file by Paul Kienitz.  Paul Wells originally used the    */
  9. /* Lattice stat.h but that does not work for Aztec and is not distributable  */
  10. /* with this package, so I made a separate one.  This has to be pulled into  */
  11. /* unzip.h when compiling an Amiga version, as "amiga/z-stat.h".             */
  12.  
  13. /* This include file should ONLY be loaded if AZTEC_C is defined, and
  14.  * you are using the substitute version of stat() from amiga/stat.c.
  15.  */
  16.  
  17. struct stat {
  18.     char st_attr;
  19.     long st_ctime;
  20.     long st_atime;
  21.     long st_mtime;
  22.     long st_size;
  23.     long st_mode;
  24.     long st_ino;
  25.     long st_blocks;
  26.     long st_blksize;
  27.     short st_dev, st_nlink, st_uid, st_gid, st_rdev;    /* not used */
  28. };
  29.  
  30. /* These st_mode values are completely random, but that doesn't matter: */
  31.  
  32. #define S_IFDIR  0x1000
  33. #define S_IFREG  0x2000
  34. #define S_IFMT   (S_IFDIR|S_IFREG)
  35.  
  36. #if 0                    /* S_IFLNK zapped per PaulK */
  37. #define S_IFLNK  0x4000
  38. #endif
  39.  
  40. #define S_IFSOCK 0x800
  41. #define S_IFCHR  0x400
  42. #define S_IFIFO  0x200
  43.  
  44. #define S_ISCRIPT    (1<<6)
  45. #define S_IPURE      (1<<5)
  46. #define S_IARCHIVE   (1<<4)
  47. #define S_IREAD      (1<<3)
  48. #define S_IWRITE     (1<<2)
  49. #define S_IEXECUTE   (1<<1)
  50. #define S_IDELETE    (1<<0)
  51.  
  52. #endif __STAT_H
  53.